import { selectToLabel, arrayGroup } from '@/utils/index'
  
// 老虎机盘面设置
export class TigerSurface {
  localApi(checkedItem: any,arr: any,nameList: any): any {
    let name = [] as string[];
    // 【赏金女王】数据4个一组 每一组第一个不展示
    if(checkedItem.game_id == 84){
      if(arr){
        let newArr = arrayGroup(arr,4)
        newArr.forEach((item:any)=>{
          item.splice(0,1)
          item.forEach((second:any)=>{
            name.push(selectToLabel(nameList, Number(second)))
          })
        })
      }
    }
    // 【赏金女王】数据4个一组 每一组第一个不展示
    if(checkedItem.game_id == 84){
      if(arr){
        let newArr = arrayGroup(arr,4)
        newArr.forEach((item:any)=>{
          item.splice(0,1)
          item.forEach((second:any)=>{
            name.push(selectToLabel(nameList, Number(second)))
          })
        })
      }
    }else{
      if(arr){
        arr.forEach((item:string)=>{
          name.push(selectToLabel(selectToLabel(nameList, checkedItem.game_id), Number(item)))
        })
      }
    }
    return name
  }
}